﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="EditQuestion.aspx.vb" Inherits="Training.EditQuestion" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Training - Training:: Edit Quiz Question</title>
<link rel="Stylesheet" type="text/css" media="screen" href="../css/adminStyle.css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="ctr">
        <h2>Edit/Delete Quiz Question</h2>
        <div style="width:400px;text-align:left;margin:0 auto;font-size: .8em;" class="small">
            Editing a question does NOT change any associated answers or 
            the results of previously taken quizzes. The text and image may change but answer 
            values will remain if this question is already being used. This control is only 
            recommended for fixing grammatical mistakes and upating images.
        </div>
        
        <div style="width:500px;text-align:left;margin:0 auto;" class="text">
            <div class="row">
                <div class="full">Quiz Question: 
                    <asp:RequiredFieldValidator ID="rfQuest" runat="server" ErrorMessage="required" 
                        ControlToValidate="tbQuestion" CssClass="small" Display="Dynamic"></asp:RequiredFieldValidator><br />
                    <asp:TextBox ID="tbQuestion" CssClass="formfield" Width="450" Height="150" TextMode="MultiLine" 
                    runat="server"></asp:TextBox>
                </div>
                <div class="clr"></div>
            </div>
            
            <div class="row">
                <div class="full">
                    Current Image: <asp:Label ID="lblImage" runat="server" Text=""></asp:Label>
                </div>
                <div class="clr"></div>
            </div>
            
            <div class="row">
                <div class="full">
                    <asp:CheckBox ID="cbImages" AutoPostBack="true" CssClass="small" 
                        Text="Click to enable image uploads" CausesValidation="false" runat="server" />
                </div>
                <div class="clr"></div>
            </div>
            
            <div class="row">
                <div class="full">Full Image: 
                    <asp:RequiredFieldValidator ID="rfFullImg" runat="server" 
                        ErrorMessage="required" ControlToValidate="fuImage" CssClass="small" 
                        Display="Dynamic" Enabled="false"></asp:RequiredFieldValidator><br />
                    <asp:FileUpload ID="fuImage" CssClass="formfield" runat="server" Enabled="false" /><br />
                    <span class="small">(.gif, .jpg or .png only :: image size max 700px height, 500px width)</span>
                </div>
                <div class="clr"></div>
            </div>
            
            <div class="row">
                <div class="full">Thumb Image: <asp:RequiredFieldValidator ID="rfThumbImg" runat="server" 
                        ErrorMessage="required" ControlToValidate="fuThumb" CssClass="small" 
                        Display="Dynamic" Enabled="false"></asp:RequiredFieldValidator><br />
                    <asp:FileUpload ID="fuThumb" CssClass="formfield" runat="server" Enabled="false" /><br />
                    <span class="small">(.gif, .jpg or .png only :: image size 100px max height and width)</span>
                </div>
                <div class="clr"></div>
            </div>
            
            <div class="row">
                <div class="full">Image Placement: 
                    <asp:RangeValidator ID="rvPlace" runat="server" ErrorMessage="required" 
                        ControlToValidate="ddlPlacement" CssClass="small" Display="Dynamic" 
                        MaximumValue="1" MinimumValue="0" Type="Integer" Enabled="false"></asp:RangeValidator><br />
                    <asp:DropDownList ID="ddlPlacement" runat="server" CssClass="formfield" Enabled="false">
                        <asp:ListItem Text="-select-" Value="-1"></asp:ListItem>
                        <asp:ListItem Text="Top" Value="1"></asp:ListItem>
                        <asp:ListItem Text="Right" Value="0"></asp:ListItem>
                    </asp:DropDownList>
                </div>
                <div class="clr"></div>
            </div>
            
            <div class="row">
                <div class="full">
                    <asp:Button ID="btnEdit" runat="server" Text="Update Question" CssClass="button" /> 
                    <asp:Button ID="btnDelete" runat="server" Text="Delete Question" CssClass="button" />
                    <cc1:ConfirmButtonExtender ID="btnDelete_ConfirmButtonExtender" runat="server" 
                        ConfirmText="Deleting a question will affect ALL previously taken quizzes and remove data from existing results, are you sure you want to delete?" Enabled="True" TargetControlID="btnDelete">
                    </cc1:ConfirmButtonExtender>
                </div>
                <div class="clr"></div>
            </div>
        </div>
        
        <p><asp:Label ID="lblMsg" runat="server" Text=""></asp:Label></p>
        
        <p><b><a href="Questions.aspx">Quiz Questions</a> - <a href="QuizControl.aspx">Quiz Control</a></b></p>
        <br />
        <p><a href="Default.aspx">Admin Main</a></p>
    </div>
    </form>
</body>
</html>
